package com.bee.health;


import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.animation.AlphaAnimation;

public class LoadActivity extends Activity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_load);
		
		
		 AlphaAnimation aa=new AlphaAnimation(0.2f, 1.0f);
		 aa.setDuration(500);
		 findViewById(R.id.rl_root_splash).startAnimation(aa);
		 
		 new Thread(new Runnable() {
			
			@Override
			public void run() {
				// TODO Auto-generated method stub
				try {
					Thread.sleep(2000);//休息2s
					runOnUiThread(new Runnable() {
						
						@Override
						public void run() {
						     enterRegister();//进入主界面
						}
					});
				} catch (InterruptedException e) {
					e.printStackTrace();
				}
			}
		}).start();
		
	}

	protected void enterRegister() {
		Intent intent =new Intent(this,SHomeActivity.class);
		startActivity(intent);
		//关闭当前页面
		finish();
	}

}
